<template>
    <div class="nav">
        <van-grid :column-num="5" :border="false">
          <van-grid-item
            v-for="item in navList"
            :key="item.navid"
            :icon="item.imgurl"
            :text="item.title"
          />
        </van-grid>
      </div>
</template>

<script>
import { getNavList } from "../../apis/home";
import Vue from "vue";

import {  Grid, GridItem } from "vant";
Vue.use(Grid);
Vue.use(GridItem);

export default {
    name: 'Nav',

    data() {
        return {
            navList:[]
        };
    },

    mounted() {
        
    },

    methods: {
        
    },created () {
    getNavList().then((data) => {
      // console.log(data)
      this.navList = data.data;
    });
  }
};
</script>

<style  scoped>
.nav{
  margin-top: .1rem;
  
}
.van-grid{
  background-color: #eee;
}
</style>